package com.ljfresh.customer.erp;

import org.apache.commons.codec.binary.Base64;

import java.nio.charset.Charset;

/**
 * @author: Lucifer
 * @time: 2020/4/13-10:38
 */
public class ERPConsts {

    public static final String get_code_url = "https://cloud.nhsoft.cn/authserver/oauth/authorize?response_type=code&status=STATE&client_id=APPID&redirect_uri=REDIRECTURI";

    public static final String get_token_url = "https://cloud.nhsoft.cn/authserver/oauth/token";

    public static final String basicUrl = "https://cloud.nhsoft.cn/api/";

    public static final String erpTokenRedisKey = "erp_token_redis_key";
    public static final String countAppId = "bfea7fc65d73458b902c7d7d695142fd";
    public static final String countSecret = "ca215ef41a494337998d1b51f6beb7b0";
    public static final String getTokenUrl = "https://cloud.nhsoft.cn/authserver/oauth/token";
    public static final String rediRecturiTest = "http://r33tbs.natappfree.cc/redirectCode";
    public static final String rediRecturi = "https://kf2.lejia100.cn/customer/redirectCode";

    public static String getHeader(){
        String auth = countAppId + ":" + countSecret;
        byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(Charset.forName("US-ASCII")));
        String authHeader = "Basic " + new String(encodedAuth);
        return authHeader;
    }

    /**
     * 获取商品(增量下载)
     */
    public static final String get_good_url = "nhsoft.amazon.item.list"; //获取商品(增量下载)
    /**
     * 调入单
     */
    public static final String transfer_in_url = "nhsoft.amazon.chain.transferin.order.find";  //查询调入单
    /**
     * 获取门店
     */
    public static final String get_store_url = "nhsoft.amazon.branch.list";   //查询所有门店


}
